<%--
  Created by IntelliJ IDEA.
  User: Peanut
  Date: 2022/11/17
  Time: 11:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
</head>
<body>




<%@ page import="Bean.LoginBean" %>
<%@ page import="Dao.Impl.StuDaoImpl" %>
<%@ page import="Dao.Impl.TeaDaoImpl" %>
<%@ page import="java.sql.SQLOutput" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="Dao.Impl.ManDaoImpl" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<head>
    <title>河南工业大学</title>
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">

</head>

<body style=" background-image: url(image/6.jpg); background-size: cover; background-attachment: fixed ">
<script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
<div style="height: 0.1px"></div>

<%
    request.setCharacterEncoding("utf-8");

    String uzhanghao=(String) request.getAttribute("uzhanghao");
    String umima=(String) request.getAttribute("umima");

    String Msg=(String) request.getAttribute("Msg");
    if(Msg==null)
        Msg="";
    String Msg1=(String) request.getAttribute("Msg1");
    String Msg11=(String) request.getAttribute("Msg11");
    String Msg2=(String) request.getAttribute("Msg2");
    String Msg22=(String) request.getAttribute("Msg22");
    String Msg3=(String) request.getAttribute("Msg3");
    String Msg33=(String) request.getAttribute("Msg33");
    String Msg4=(String) request.getAttribute("Msg4");
    String Msg44=(String) request.getAttribute("Msg44");
    String Msg5=(String) request.getAttribute("Msg5");
    String Msg55=(String) request.getAttribute("Msg55");
    String Msg6=(String) request.getAttribute("Msg6");
    String Msg66=(String) request.getAttribute("Msg66");

    LoginBean u=new LoginBean();
    u.setId(uzhanghao);
    u.setPassword(umima);
    ManDaoImpl man=new ManDaoImpl();
%>

<div style="width: 1250px;height: 900px;margin: 40px auto 0;border-radius: 5px;box-shadow: 0 0 5px rgba(0,0,0,.5);overflow: hidden;backdrop-filter: blur(10px)">

    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="margin: 20px 0 0 60px">
        <ul class="layui-tab-title" style="margin: 0 50px 0 -10px ">
            <li class="<%=Msg1%>" style="font-size: 30px;font-weight: bolder;margin: 0 0 0 0px">添加学生</li>
            <li class="<%=Msg2%>" style="font-size: 30px;font-weight: bolder;margin: 0 0 0 50px">查询学生</li>
            <li class="<%=Msg3%>" style="font-size: 30px;font-weight: bolder;margin: 0 0 0 50px">删除学生</li>
            <li class="<%=Msg4%>" style="font-size: 30px;font-weight: bolder;margin: 0 0 0 50px">添加教师</li>
            <li class="<%=Msg5%>" style="font-size: 30px;font-weight: bolder;margin: 0 0 0 50px">查询教师</li>
            <li class="<%=Msg6%>" style="font-size: 30px;font-weight: bolder;margin: 0 0 0 50px">删除教师</li>
        </ul>

        <div class="layui-tab-content" style="height: 700px;width: 1100px; background-color: white;margin: 50px 0 0 20px;border-radius: 5px;box-shadow: 0 0 5px rgba(0,0,0,.5);">

            <div class="layui-tab-item <%=Msg11%>">

                <div style="width: 900px;height: 270px;margin: 0 auto ;overflow: hidden">
                    <form class="layui-form" action="AddStuServlet" method="post">


                        <div style="margin: 0 0 0 150px; width: 250px;float: left">
                            <select name="class" lay-verify="required" >
                                <option value="">请选择学生班级</option>
                                <option value="软件2001班">软件2001班</option>
                                <option value="软件2002班">软件2002班</option>
                                <option value="软件2003班">软件2003班</option>
                                <option value="软件2004班">软件2004班</option>
                            </select>
                        </div>


                        <div style="margin: 30px 0 0 500px; width: 250px">
                            <input type="text" name="id" placeholder="请输入学生学号" class="layui-input" style="width: 250px">
                        </div>

                        <div style="margin: 30px 0 0 150px; width: 250px;float: left">
                            <input type="text" name="name" placeholder="请输入学生姓名" class="layui-input" style="width: 250px">
                        </div>

                        <div style="margin: 30px 0 0 500px; width: 250px">
                            <input type="password" name="password" placeholder="请输入学生密码" class="layui-input" style="width: 250px">
                        </div>

                        <div style="margin: 30px auto; width: 600px;height: 44px;background-color: white">
                            <button type="submit" class="layui-btn layui-btn-lg" style="background-color: #5FB878;width: 600px" >添加</button>
                        </div>

                    </form>
                </div>

                <div style="margin: -10px auto;width: 600px;height: 400px; overflow-y:scroll">
                <table class="layui-table" >
                    <colgroup>
                        <col width="200">
                        <col width="200">
                        <col width="200">
                    </colgroup>
                    <thead>
                    <tr>
                        <th>学号</th>
                        <th>姓名</th>
                        <th>班级</th>
                    </tr>
                    </thead>
                    <tbody>
                    <%
                        StuDaoImpl stu=new StuDaoImpl();
                        for(int i=0;i< stu.Show().size();i++) {
                    %>
                    <tr>
                        <td><%= stu.Show().get(i).getId() %></td>
                        <td><%= stu.Show().get(i).getName() %></td>
                        <td><%= stu.Show().get(i).getClss() %></td>
                    </tr>
                    <%
                        }
                    %>
                    </tbody>
                </table>
                </div>

            </div>

            <div class="layui-tab-item <%=Msg22%>">

                <div style="width: 500px;height: 300px;margin: 0  auto ;overflow: hidden">
                    <form class="layui-form" action="FindStuServlet" method="post">

                        <input type="hidden" name="id" value="<%=uzhanghao%>">
                        <input type="hidden" name="password" value="<%=umima%>">

                        <label class="layui-form-label" style="margin: 0px 0 0 0; width: 28px">班级</label>
                        <div style="margin: 60px 0 0 60px; width: 250px">
                            <select name="class" lay-verify="required">
                                <option value=""></option>
                                <option value="软件2001班">软件2001班</option>
                                <option value="软件2002班">软件2002班</option>
                                <option value="软件2003班">软件2003班</option>
                                <option value="软件2004班">软件2004班</option>
                            </select>
                        </div>
                        <button type="submit" class="layui-btn layui-btn-lg" style="background-color: #5FB878;width: 118px;margin: -42px 0 0 330px" >查询</button>
                    </form>
                </div>

                <table class="layui-table" style="margin: -100px auto;width: 900px">
                    <colgroup>
                        <col width="200">
                        <col width="200">
                        <col width="200">
                        <col width="200">
                    </colgroup>
                    <thead>
                    <tr>
                        <th>学号</th>
                        <th>姓名</th>
                        <th>班级</th>
                        <th>打卡情况</th>
                    </tr>
                    </thead>
                    <tbody>


                    <%
                        ArrayList<LoginBean> users= (ArrayList<LoginBean>) session.getAttribute("users");

                        if(users==null||users.size()==0)
                            out.print("");
                        else
                            for(int i=0;i< users.size();i++) {
                                LoginBean user=(LoginBean) users.get(i);
                    %>
                    <tr>
                        <td><%= user.getId() %></td>
                        <td><%= user.getName() %></td>
                        <td><%= user.getClss() %></td>
                        <td><%= user.getCard() %></td>
                    </tr>
                    <%
                            }
                    %>


                    </tbody>
                </table>

            </div>

            <div class="layui-tab-item <%=Msg33%>">

                <div style="width: 500px;height: 300px;margin: 0  auto ;overflow: hidden">
                    <form class="layui-form" action="DelStuServlet" method="post">

                        <input type="hidden" name="id" value="<%=uzhanghao%>">
                        <input type="hidden" name="password" value="<%=umima%>">

                        <label class="layui-form-label" style="margin: 0px 0 0 0; width: 28px">学号</label>
                        <div style="margin: 60px 0 0 60px; width: 250px">
                            <input type="text" name="idd" placeholder="请输入学生学号" class="layui-input" style="width: 250px">
                        </div>
                        <button type="submit" class="layui-btn layui-btn-lg" style="background-color: #5FB878;width: 118px;margin: -42px 0 0 330px" >删除</button>
                    </form>
                </div>

                <div style="margin: -100px auto;width: 600px;height: 400px; overflow-y:scroll">
                    <table class="layui-table" >
                        <colgroup>
                            <col width="200">
                            <col width="200">
                            <col width="200">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>学号</th>
                            <th>姓名</th>
                            <th>班级</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                            StuDaoImpl stu2=new StuDaoImpl();
                            for(int i=0;i< stu2.Show().size();i++) {
                        %>
                        <tr>
                            <td><%= stu2.Show().get(i).getId() %></td>
                            <td><%= stu2.Show().get(i).getName() %></td>
                            <td><%= stu2.Show().get(i).getClss() %></td>
                        </tr>
                        <%
                            }
                        %>
                        </tbody>
                    </table>
                </div>

            </div>

            <div class="layui-tab-item <%=Msg44%>">

                <div style="width: 900px;height: 270px;margin: 0 auto ;overflow: hidden">
                    <form class="layui-form" action="AddTeaServlet" method="post">


                        <div style="margin: 0 0 0 150px; width: 250px;float: left">
                            <select name="class" lay-verify="required" >
                                <option value="">请选择教师班级</option>
                                <option value="软件2001班">软件2001班</option>
                                <option value="软件2002班">软件2002班</option>
                                <option value="软件2003班">软件2003班</option>
                                <option value="软件2004班">软件2004班</option>
                            </select>
                        </div>


                        <div style="margin: 30px 0 0 500px; width: 250px">
                            <input type="text" name="id" placeholder="请输入教师工号" class="layui-input" style="width: 250px">
                        </div>

                        <div style="margin: 30px 0 0 150px; width: 250px;float: left">
                            <input type="text" name="name" placeholder="请输入教师姓名" class="layui-input" style="width: 250px">
                        </div>

                        <div style="margin: 30px 0 0 500px; width: 250px">
                            <input type="password" name="password" placeholder="请输入教师密码" class="layui-input" style="width: 250px">
                        </div>

                        <div style="margin: 30px auto; width: 600px;height: 44px;background-color: white">
                            <button type="submit" class="layui-btn layui-btn-lg" style="background-color: #5FB878;width: 600px" >添加</button>
                        </div>

                    </form>
                </div>

                <div style="margin: -10px auto;width: 600px;height: 400px; overflow-y:scroll">
                    <table class="layui-table" >
                        <colgroup>
                            <col width="200">
                            <col width="200">
                            <col width="200">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>工号</th>
                            <th>姓名</th>
                            <th>班级</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                            TeaDaoImpl tea=new TeaDaoImpl();
                            for(int i=0;i< tea.Show().size();i++) {
                        %>
                        <tr>
                            <td><%= tea.Show().get(i).getId() %></td>
                            <td><%= tea.Show().get(i).getName() %></td>
                            <td><%= tea.Show().get(i).getClss() %></td>
                        </tr>
                        <%
                            }
                        %>
                        </tbody>
                    </table>
                </div>

            </div>

            <div class="layui-tab-item <%=Msg55%>">

                <div style="width: 500px;height: 300px;margin: 0  auto ;overflow: hidden">
                    <form class="layui-form" action="FindTeaServlet" method="post">

                        <input type="hidden" name="id" value="<%=uzhanghao%>">
                        <input type="hidden" name="password" value="<%=umima%>">

                        <label class="layui-form-label" style="margin: 0px 0 0 0; width: 28px">班级</label>
                        <div style="margin: 60px 0 0 60px; width: 250px">
                            <select name="class" lay-verify="required">
                                <option value=""></option>
                                <option value="软件2001班">软件2001班</option>
                                <option value="软件2002班">软件2002班</option>
                                <option value="软件2003班">软件2003班</option>
                                <option value="软件2004班">软件2004班</option>
                            </select>
                        </div>
                        <button type="submit" class="layui-btn layui-btn-lg" style="background-color: #5FB878;width: 118px;margin: -42px 0 0 330px" >查询</button>
                    </form>
                </div>

                <table class="layui-table" style="margin: -100px auto;width: 600px">
                    <colgroup>
                        <col width="200">
                        <col width="200">
                        <col width="200">
                    </colgroup>
                    <thead>
                    <tr>
                        <th>工号</th>
                        <th>姓名</th>
                        <th>班级</th>
                    </tr>
                    </thead>
                    <tbody>


                    <%
                        ArrayList<LoginBean> users2= (ArrayList<LoginBean>) session.getAttribute("users2");

                        if(users2==null||users2.size()==0)
                            out.print("");
                        else
                            for(int i=0;i< users2.size();i++) {
                                LoginBean user=(LoginBean) users2.get(i);
                    %>
                    <tr>
                        <td><%= user.getId() %></td>
                        <td><%= user.getName() %></td>
                        <td><%= user.getClss() %></td>
                    </tr>
                    <%
                            }
                    %>


                    </tbody>
                </table>

            </div>

            <div class="layui-tab-item <%=Msg66%>">

                <div style="width: 500px;height: 300px;margin: 0  auto ;overflow: hidden">
                    <form class="layui-form" action="DelTeaServlet" method="post">

                        <input type="hidden" name="id" value="<%=uzhanghao%>">
                        <input type="hidden" name="password" value="<%=umima%>">

                        <label class="layui-form-label" style="margin: 0px 0 0 0; width: 28px">工号</label>
                        <div style="margin: 60px 0 0 60px; width: 250px">
                            <input type="text" name="iddd" placeholder="请输入教师工号" class="layui-input" style="width: 250px">
                        </div>
                        <button type="submit" class="layui-btn layui-btn-lg" style="background-color: #5FB878;width: 118px;margin: -42px 0 0 330px" >删除</button>
                    </form>
                </div>

                <div style="margin: -100px auto;width: 600px;height: 400px; overflow-y:scroll">
                    <table class="layui-table" >
                        <colgroup>
                            <col width="200">
                            <col width="200">
                            <col width="200">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>工号</th>
                            <th>姓名</th>
                            <th>班级</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                            TeaDaoImpl tea2=new TeaDaoImpl();
                            for(int i=0;i< tea2.Show().size();i++) {
                        %>
                        <tr>
                            <td><%= tea2.Show().get(i).getId() %></td>
                            <td><%= tea2.Show().get(i).getName() %></td>
                            <td><%= tea2.Show().get(i).getClss() %></td>
                        </tr>
                        <%
                            }
                        %>
                        </tbody>
                    </table>
                </div>

            </div>

        </div>

    </div>


</div>


</body>

</html>




<script src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
</body>
</html>
